import requests

class interfaace_test(object):
    def __init__(self):
        pass

    def auth_int(self,url,params,authurl,authparams):
        session = requests.Session()
        session.post(authurl, json=authparams)
        r = session.post(url, json=params)
        print(r.url)
        print(r.status_code)
        if r.status_code == 200:
            print(r.json())

    def other_int(self,url,params):
        r = requests.post(url, data=params)
        request_data = None
        print(r.url)
        print(r.status_code)
        if r.status_code == 200:
            request_data = r.json()
        else:
            request_data = r.content
        return request_data

